import 'package:winkai/generated/json/base/json_field.dart';
import 'package:winkai/generated/json/a_iap_rsp.g.dart';
import 'dart:convert';
export 'package:winkai/generated/json/a_iap_rsp.g.dart';

@JsonSerializable()
class AIAPRsp {
	AIAPRspEntity? entity;
	List<dynamic>? checks;

	AIAPRsp();

	factory AIAPRsp.fromJson(Map<String, dynamic> json) => $AIAPRspFromJson(json);

	Map<String, dynamic> toJson() => $AIAPRspToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class AIAPRspEntity {
	String? environment;
	int? status;
	AIAPRspEntityReceipt? receipt;
	@JSONField(name: "latest_receipt_info")
	List<AIAPRspEntityLatestReceiptInfo>? latestReceiptInfo;
	@JSONField(name: "pending_renewal_info")
	List<AIAPRspEntityPendingRenewalInfo>? pendingRenewalInfo;
	bool? ok;
	@JSONField(name: "device_id")
	String? deviceId;

	AIAPRspEntity();

	factory AIAPRspEntity.fromJson(Map<String, dynamic> json) => $AIAPRspEntityFromJson(json);

	Map<String, dynamic> toJson() => $AIAPRspEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class AIAPRspEntityReceipt {
	@JSONField(name: "receipt_type")
	String? receiptType;
	@JSONField(name: "adam_id")
	int? adamId;
	@JSONField(name: "app_item_id")
	int? appItemId;
	@JSONField(name: "bundle_id")
	String? bundleId;
	@JSONField(name: "application_version")
	String? applicationVersion;
	@JSONField(name: "download_id")
	int? downloadId;
	@JSONField(name: "version_external_identifier")
	int? versionExternalIdentifier;
	@JSONField(name: "receipt_creation_date")
	String? receiptCreationDate;
	@JSONField(name: "receipt_creation_date_ms")
	int? receiptCreationDateMs;
	@JSONField(name: "receipt_creation_date_pst")
	String? receiptCreationDatePst;
	@JSONField(name: "request_date")
	String? requestDate;
	@JSONField(name: "request_date_ms")
	int? requestDateMs;
	@JSONField(name: "request_date_pst")
	String? requestDatePst;
	@JSONField(name: "original_purchase_date_ms")
	int? originalPurchaseDateMs;
	@JSONField(name: "original_purchase_date")
	String? originalPurchaseDate;
	@JSONField(name: "original_purchase_date_pst")
	String? originalPurchaseDatePst;
	@JSONField(name: "original_application_version")
	String? originalApplicationVersion;
	@JSONField(name: "in_app")
	List<AIAPRspEntityReceiptInApp>? inApp;

	AIAPRspEntityReceipt();

	factory AIAPRspEntityReceipt.fromJson(Map<String, dynamic> json) => $AIAPRspEntityReceiptFromJson(json);

	Map<String, dynamic> toJson() => $AIAPRspEntityReceiptToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class AIAPRspEntityReceiptInApp {
	@JSONField(name: "expires_date_ms")
	int? expiresDateMs;
	@JSONField(name: "expires_date")
	String? expiresDate;
	@JSONField(name: "expires_date_pst")
	String? expiresDatePst;
	@JSONField(name: "original_purchase_date_ms")
	int? originalPurchaseDateMs;
	@JSONField(name: "original_purchase_date")
	String? originalPurchaseDate;
	@JSONField(name: "original_purchase_date_pst")
	String? originalPurchaseDatePst;
	@JSONField(name: "is_trial_period")
	bool? isTrialPeriod;
	@JSONField(name: "is_in_intro_offer_period")
	bool? isInIntroOfferPeriod;
	@JSONField(name: "purchase_date_ms")
	int? purchaseDateMs;
	@JSONField(name: "purchase_date")
	String? purchaseDate;
	@JSONField(name: "purchase_date_pst")
	String? purchaseDatePst;
	@JSONField(name: "product_id")
	String? productId;
	@JSONField(name: "transaction_id")
	String? transactionId;
	@JSONField(name: "original_transaction_id")
	String? originalTransactionId;
	String? quantity;
	@JSONField(name: "web_order_line_item_id")
	String? webOrderLineItemId;

	AIAPRspEntityReceiptInApp();

	factory AIAPRspEntityReceiptInApp.fromJson(Map<String, dynamic> json) => $AIAPRspEntityReceiptInAppFromJson(json);

	Map<String, dynamic> toJson() => $AIAPRspEntityReceiptInAppToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class AIAPRspEntityLatestReceiptInfo {
	String? quantity;
	@JSONField(name: "product_id")
	String? productId;
	@JSONField(name: "transaction_id")
	String? transactionId;
	@JSONField(name: "original_transaction_id")
	String? originalTransactionId;
	@JSONField(name: "web_order_line_item_id")
	String? webOrderLineItemId;
	@JSONField(name: "subscription_group_identifier")
	String? subscriptionGroupIdentifier;
	@JSONField(name: "is_trial_period")
	String? isTrialPeriod;
	@JSONField(name: "is_in_intro_offer_period")
	String? isInIntroOfferPeriod;
	@JSONField(name: "in_app_ownership_type")
	String? inAppOwnershipType;
	@JSONField(name: "purchase_date_ms")
	int? purchaseDateMs;
	@JSONField(name: "purchase_date")
	String? purchaseDate;
	@JSONField(name: "purchase_date_pst")
	String? purchaseDatePst;
	@JSONField(name: "original_purchase_date_ms")
	int? originalPurchaseDateMs;
	@JSONField(name: "original_purchase_date")
	String? originalPurchaseDate;
	@JSONField(name: "original_purchase_date_pst")
	String? originalPurchaseDatePst;
	@JSONField(name: "expires_date_ms")
	int? expiresDateMs;
	@JSONField(name: "expires_date")
	String? expiresDate;
	@JSONField(name: "expires_date_pst")
	String? expiresDatePst;

	AIAPRspEntityLatestReceiptInfo();

	factory AIAPRspEntityLatestReceiptInfo.fromJson(Map<String, dynamic> json) => $AIAPRspEntityLatestReceiptInfoFromJson(json);

	Map<String, dynamic> toJson() => $AIAPRspEntityLatestReceiptInfoToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class AIAPRspEntityPendingRenewalInfo {
	@JSONField(name: "auto_renew_status")
	String? autoRenewStatus;
	@JSONField(name: "original_transaction_id")
	String? originalTransactionId;

	AIAPRspEntityPendingRenewalInfo();

	factory AIAPRspEntityPendingRenewalInfo.fromJson(Map<String, dynamic> json) => $AIAPRspEntityPendingRenewalInfoFromJson(json);

	Map<String, dynamic> toJson() => $AIAPRspEntityPendingRenewalInfoToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}